/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package problems;

import java.util.ArrayList;
import objective_functions.ObjectiveFunction;
import mopso.Problem;
import objective_functions.ZDT6_F1;
import objective_functions.ZDT6_F2;

/**
 *
 * @author robson
 */
public class ZDT6 implements Problem {

    private ArrayList<ObjectiveFunction> functions;
    private int nFunctions;
    private int nDimensions;

    public ZDT6() {
        functions = new ArrayList<ObjectiveFunction>();

        functions.add( new ZDT6_F1( this ) );
        functions.add( new ZDT6_F2( this ) );

        nFunctions = functions.size();
        nDimensions = 10;
    }

    public ArrayList<ObjectiveFunction> getFunctions() {
        return functions;
    }

    public int getNDimensions() {
        return nDimensions;
    }

    public int getNObjectives() {
        return nFunctions;
    }

    public double getMaxBound(int dimension) {
        return 1.0;
    }

    public double getMinBound(int dimension) {
        return 0.0;
    }

    public double getMaxInitValue(int dimension) {
        return 1.0;
    }    

    public double getMinInitValue(int dimension) {
        return 0.0;
    }

    public double getGValue() {
        return ((ZDT6_F2) functions.get(1)).getGValue();
    }

    public String getName() {
        return "ZDT 6";
    }
}
